/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
     
            
var wi, he;
	
wi = screen.width;
he = screen.height;
		
		var detect = navigator.userAgent.toLowerCase();
		var OS,browser,version,total,thestring;

if (checkIt('opera')){browser = "Opera";
        OS = "Linux";}
else if (checkIt('firefox')) browser = "Firefox"
else if (checkIt('chrome')) browser = "Chrome";
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
        browser = "Netscape Navigator"
        version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
        if (checkIt('linux')) OS = "Linux";
        else if (checkIt('x11')) OS = "Unix";
        else if (checkIt('mac')) OS = "Mac"
        else if (checkIt('win')) OS = "Windows"
        else OS = "an unknown operating system";
}

function checkIt(string)
{
        place = detect.indexOf(string) + 1;
        thestring = string;
        return place;
}

function info(){
document.getElementById("texto1").innerHTML="<font color='#0ff'>SO: "+ OS; 
document.getElementById("texto2").innerHTML="<font color='#f0f'>Navegador: "+browser;
document.getElementById("texto3").innerHTML="<font color='#ff0'>Resolucao: "+wi+"x"+he;

}